package com.ajobs.project.comp;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;
import org.springframework.util.ClassUtils;

import java.io.*;
import java.net.URI;
import java.net.URL;

/**
 * Description
 *
 * @author weijianxun
 */
// @Component
public class TestComponent implements InitializingBean {
    @Override
    public void afterPropertiesSet() throws Exception {
        URL url = ClassUtils.getDefaultClassLoader().getResource("fonts/wjx.txt");

        try (InputStream in = url.openStream(); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in));
        ) {
            System.out.println(bufferedReader.readLine());
        } catch (Exception e) {

        }

    }
}
